package com.yowasa.xiuxian.engine.message.help;

import com.yowasa.xiuxian.annoations.CMD;
import com.yowasa.xiuxian.engine.message.CmdMessageHandler;
import com.yowasa.xiuxian.entity.enums.CmdScopeEnum;
import com.yowasa.xiuxian.entity.mys.MysComponent;
import com.yowasa.xiuxian.entity.mys.SendMessage;
import com.yowasa.xiuxian.service.helper.MessageHelper;
import com.yowasa.xiuxian.util.ComponentUtil;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * 获取描述
 */
@CMD(name = "/学习1", scope = CmdScopeEnum.ALL,outCmd = true)
public class StudyHandler extends CmdMessageHandler {
    @Autowired
    private MessageHelper messageHelper;

    @Override
    public void execute(SendMessage message) {


        MysComponent component = new MysComponent("1",2, "学习战技","/学习战技");
        MysComponent componentA = new MysComponent("2",2, "学习心法","/学习心法");
        MysComponent componentB = new MysComponent("3",2, "学习神通","/学习神通");
        List<List<MysComponent>> lists = ComponentUtil.genComponentList(2, component, componentA, componentB);

        messageHelper.replyMysPanel(message, "可以使用/学习战技，/学习心法，/学习神通三个指令\n学习心法后才能开始修炼，是修仙世界中最重要的一环，心法会自带战技与神通\n，战技是战斗中使用的技能，神通一般是对自身属性的加成",null,lists,null);
    }

    public String desc(){
        return new StringBuffer().append("学习战技，学习心法，学习神通！！！\n")
                .toString();

    }
}
